import random

flag = True if random.randint(0,2) == 0 else False

base = '0123456789abcdefABCDEF'
illegal_base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
legal_len = 32

if flag:
	# 随机生成一个合法字符串
	ans = ''
	for i in range(legal_len):
		ans = ans + base[random.randint(0, len(base) - 1)]
	print(ans)
else:
	# 随机生成一个非法字符串
	v = random.randint(0,2)
	if 0 == v:
		# 长度合法，字符不合法
		ans = ''
		for i in range(legal_len):
			ans = ans + illegal_base[random.randint(0, len(illegal_base) - 1)]
		print(ans)
	if 1 == v:
		# 字符合法，长度不合法
		ans = ''
		slen = random.randint(1, 300)
		for i in range(slen):
			ans = ans + base[random.randint(0, len(base) - 1)]
		print(ans)
	if 2 == v:
		# 字符长度均不合法
		ans = ''
		slen = random.randint(1, 300)
		for i in range(slen):
			ans = ans + illegal_base[random.randint(0, len(illegal_base) - 1)]
		print(ans)
